package com.fas.system.mapper;

import com.fas.system.domain.FasWordOrder;
import com.fas.system.domain.vo.WordOrderAndEquipment;
import com.fas.system.domain.vo.WordOrderAndRecord;
import com.fas.system.domain.vo.WordOrderVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FasWordOrderMapper {

    int saveFasWordOrder(FasWordOrder fasWordOrde);

    int updateFasWordOrder(FasWordOrder fasWordOrde);

    int insertNullData(FasWordOrder fasWordOrder);

    List<WordOrderVo> miniappManorder(@Param("statusList") List<Integer> statusList,@Param("userId") Integer userId,
                                      @Param("deptId")Long deptId,@Param("cooperationCompanyId")Integer cooperationCompanyId);

    /**
     *
     * @param wordOrderStatus
     * @param userId
     * @param startTime
     * @param endTime
     * @param cooperationCompanyId
     * @param engineerResult
     * @param status        status不为空时查询工程师未确认的数据
     * @return
     */
    List<WordOrderVo> miniappEngineerOrder(@Param("wordOrderStatus") Integer wordOrderStatus,@Param("userId") Integer userId,
                                           @Param("startTime")String startTime, @Param("endTime")String endTime,
                                           @Param("cooperationCompanyId") Integer cooperationCompanyId,
                                           @Param("engineerResult")Integer engineerResult,@Param("status") Integer status,
                                           @Param("deptId")Long deptId);

    WordOrderAndEquipment findEngineerAlarmDetail(Integer wordOrderId);
    /**
     * 维保单位查看工单详情
     * @return
     */
    WordOrderAndRecord findManLineDetail(Integer wordOrderId);

    WordOrderAndRecord findEngineerLineDetail(Integer wordOrderId);

    WordOrderAndEquipment findManAlarmDetail(Integer wordOrderId);

    List<WordOrderVo> miniappIpqcCenterOrderList(@Param("wordOrderStatus") Integer wordOrderStatus,@Param("orderType") Integer orderType,
                                                @Param("userId")Integer userId);

    Integer selectEngineerGrade(Long userId);
}
